﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace Tecnosop.Dominio
{
    [MetadataType(typeof(FACTURAMetadata))]
    public partial class FACTURA
    {
        internal class FACTURAMetadata
        {
            //[HiddenInput(DisplayValue = true)]
            [DisplayName("Número de factura")]
            [Required(ErrorMessage = " Ingrese el número de factura")]
            public int NUMERO_FACTURA { get; set; }

            //[HiddenInput(DisplayValue = true)]
            [DisplayName("Razón social")]
            [Required(ErrorMessage = " Seleccione una razón social")]
            public string RAZON_SOCIAL { get; set; }

            [DataType(DataType.DateTime)]
            [DisplayName("Fecha")]
            [Required(ErrorMessage = "Ingrese la fecha")]
            public Nullable<System.DateTime> FECHA_INSTALACION { get; set; }

            [DataType(DataType.Currency)]
            //[DisplayFormat(DataFormatString = "{0:C}", ApplyFormatInEditMode = false)]
            //[ReadOnly(isReadOnly: true)]
            [DisplayName("Total")]
            [DisplayFormat(DataFormatString = "$ {0:#,##}", ApplyFormatInEditMode = true, NullDisplayText = "$ 0")]
            public Nullable<int> TOTAL { get; set; }

            [DisplayName("Descuento")]
            [DisplayFormat(DataFormatString = "# %")]
            [UIHint("Numero")]
            public Nullable<int> DESCUENTO { get; set; }

            [DisplayName("Condición de venta")]
            //[Required(ErrorMessage = "Ingrese condición de venta")]
            public string COND_DE_VENTA { get; set; }

            [ScaffoldColumn(false)]
            public Nullable<bool> NULA { get; set; }
        }
    }
}
